<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- 모바일 기기에 확대/축소 기능을 끄는 역할. native 어플 느낌 -->
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0,user-scalable=no">

<link rel="stylesheet" href="./css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="./css/bootstrap-theme.min.css" type="text/css">
<link rel="stylesheet" href="./css/adminMember.css" type="text/css">
<link rel="stylesheet" href="./css/jquery-ui.min.css" type="text/css">
<link rel="stylesheet" href="./css/jquery-ui.structure.min.css" type="text/css">
<link rel="stylesheet" href="./css/jquery-ui.theme.min.css" type="text/css">

<script type="text/javascript" src="./js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
<script type="text/javascript" src="./js/jquery-ui.min.js"></script>

<script type="text/javascript">
	function adminBlack(id){
		
		if(id!=null||id==''){
			location.href='/SomeTalk/adminBlackDelete.do?id='+id;
		}
		alert('탈퇴완료');
		self.close();
	}
	function adminWarning(id){
		var content = document.getElementById("reportContent").value;
		if(content==''||content==null){
			return false;
		}else{
			if(id!=null){
				location.href='/SomeTalk/adminBlackWarning.do?content='+content+'&suspect='+id;
				alert('송신완료');
				self.close();
			}
		}
	}
	
	$(function() {
		$( "#datepicker" ).datepicker({
		    dateFormat: "yy-mm-dd"
		});
		
	});
	
</script>
<title>블랙리스트 정보</title>
</head>
<body>
	<div id="adminBlack">
		<div id="myReportFormContainer" class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
			<div class="reportBody form-group col-lg-10 col-md-10 col-sm-10 col-xs-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1 col-xs-offset-1">
				<form action="blockMember.do">
				<input type="hidden" name="block_id" value="${blackCommand.suspect }">
					<div style="padding:0;" class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
						<label for="stop">정지 시작 날짜</label>
						<div id="stop" class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12">
							<input type="text" name="blockDay" id="datepicker" class="form-control blockDay col-lg-4 col-md-4 col-sm-4 col-xs-4">
							<div class="blockText col-lg-2 col-md-2 col-sm-2 col-xs-2">부터</div>
							<input type="number" name="blockCount" class="form-control blockCount col-lg-2 col-md-2 col-sm-2 col-xs-2">
							<div class="blockText col-lg-2 col-md-2 col-sm-2 col-xs-2">일 간</div>
							<input type="submit" name="blockStart" class="btn btn-default blockBtn col-lg-2 col-md-2 col-sm-2 col-xs-2" value="이용정지">
						</div>
					</div>
				</form>
			</div>
			<form role="form" class="reportForm col-lg-12 col-md-12 col-sm-12 col-xs-12" id="myReportForm" action="pop_upReport.do" method="post">
				
				<div class="reportBody form-group col-lg-10 col-md-10 col-sm-10 col-xs-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1 col-xs-offset-1">
					<label for="victim">신고자</label>
					<input type="text" class="form-control" name="victim" id="victim" value="${blackCommand.victim }" required readonly>
				</div>
				<div class="reportBody form-group col-lg-10 col-md-10 col-sm-10 col-xs-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1 col-xs-offset-1">
					<label for="suspect">피의자</label>&nbsp;&nbsp;&nbsp;&nbsp;
					<c:if test="${blackGrade==9 }">
						<span class="deleteMember">탈퇴한 회원</span>
					</c:if>
					<c:if test="${blackGrade!=9 }">
						<span class="deleteMember">${reportCount }번 신고당한 회원</span>
					</c:if>
					<input type="text" class="form-control" name="suspect" id="suspect" value="${blackCommand.suspect}" required readonly>
				</div>
				
				<div class="reportBody form-group col-lg-10 col-md-10 col-sm-10 col-xs-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1 col-xs-offset-1">
					<label for="content">신고 내용</label>
					<textarea class="form-control" name="content" id="content" readonly>${blackCommand.content }</textarea>
				</div>
				<div class="reportBody form-group col-lg-10 col-md-10 col-sm-10 col-xs-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1 col-xs-offset-1">
					<label for="reportContent">주의 내용</label>
					<textarea class="form-control" name="reportContent" id="reportContent" maxlength="200"></textarea>
				</div>
				<div class="reportFooter form-group col-lg-10 col-md-10 col-sm-10 col-xs-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1 col-xs-offset-1 text-center">
					<c:if test="${blackGrade!=9 }">
						<button type="button" class="btn btn-danger reportBtns" onclick="adminBlack(this.id)" id=${blackCommand.suspect }>&nbsp;&nbsp;탈퇴&nbsp;&nbsp;</button>
					</c:if>
					<button type="button" class="btn btn-warning reportBtns" onclick="adminWarning(this.id)" id=${blackCommand.suspect }>&nbsp;&nbsp;주의&nbsp;&nbsp;</button>
					<button type="button" class="btn btn-default reportBtns" onclick="self.close()">&nbsp;&nbsp;닫기&nbsp;&nbsp;</button>
				</div>
		
			</form>
		
		</div>
	</div>

</body>
</html>